import React, {Component} from 'react';
import { Menu } from 'antd';
import { Link } from 'dva/router';
import { connect } from 'dva';
import styles from './css/LeftMenu.css';

class LeftMenu extends Component {
	
	render() {
		let {state, dispatch} = this.props
		return (
			<Menu mode='inline' selectedKeys={[state.tab]} onSelect={({key}) => dispatch({type: 'system/setTab', tab: key})}>
				<Menu.Item key='用户'>用户</Menu.Item>
			  	<Menu.Item key='角色'>角色</Menu.Item>
			  	<Menu.Item key='权限'>权限</Menu.Item>
			  	<Menu.Item key='通道'>通道</Menu.Item>
			</Menu>
		)
	}
	
}

export default connect(state => ({
	state: {
		...state.system,
		loading: state.loading.models.system
	}
}))(LeftMenu);